package com.example.myapplication.lol.ui;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.myapplication.R;
import com.example.myapplication.lol.adapter.CloudAdapter;
import com.example.myapplication.lol.bean.CloudBean;

public class FragmentLol14 extends Fragment {
    private RecyclerView mRecyclerView;
    private CloudAdapter mAdapter;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_lol_1_4, container, false);
        mRecyclerView = view.findViewById(R.id.cloud_recyclerview);
        mAdapter = new CloudAdapter();
        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
        mRecyclerView.setAdapter(mAdapter);
        for (int i = 0; i < 20; i++) {
            mAdapter.addData(new CloudBean());
        }
        return view;

    }

}
